In a semiconductor device including a semiconductor chip having a switching function, noise occurs during switching. If a resonance frequency of a resonance loop formed in the semiconductor device matches a frequency of the noise, the noise will be amplified. If the noise is amplified, there is a possibility that failures will occur. For example, the semiconductor device may be brought inadvertently into an on state when the semiconductor device is intended to be in an off state and the semiconductor device will not operate properly.